#include "pch.h"
#include "Texture.h"
#include "Renderer.h"
#include "GLTexture.h"

namespace HS {

	std::shared_ptr<Texture2D> Texture2D::Create(uint32_t width, uint32_t height)
	{
		switch (Render::GetAPI())
		{
			case RendererAPI::API::None:    
				//assert(false, "RendererAPI::None is currently not supported!"); 
				return nullptr;
			case RendererAPI::API::OpenGL:  
				return std::make_shared<GLTexture2D>(width,height);
		}

		//assert(false, "Unknown RendererAPI!");
		return nullptr;
	}

	std::shared_ptr<Texture2D> Texture2D::Create(const std::string& path)
	{
		switch (Render::GetAPI())
		{
			case RendererAPI::API::None:    
				//assert(false, "RendererAPI::None is currently not supported!"); 
				return nullptr;
			case RendererAPI::API::OpenGL:  
				return std::make_shared<GLTexture2D>(path);
		}

		//assert(false, "Unknown RendererAPI!");
		return nullptr;
	}

}